Fix build on C89 compilers
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 28 May 2013 05:36:54 +0000 (13:36 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 28 May 2013 05:36:54 +0000 (13:36 +0800)
-Avoid defining variables in the middle of the block
-Include fallback-c89.c in gtkrevealer.c in place of math.h as
 fallback-c89.c includes math.h itself, and is needed for round()

gtk/gtkbookmarksmanager.c
gtk/gtkrevealer.c

index c7eb0263370ce943e00a1474b0375e9fcf115fec..f0cc53eacec3441c54dd8afee037f0426977af5c 100644 (file)
@@ -343,8 +343,9 @@ _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager,
 
   if (link)
     {
+      gchar *uri;
       bookmark = link->data;
-      gchar *uri = g_file_get_uri (bookmark->file);
+      uri = g_file_get_uri (bookmark->file);
 
       g_set_error (error,
                   GTK_FILE_CHOOSER_ERROR,
index a9aa18dd489e178cb6c276e5e859bbfcb2cf256d..a38d2c6e14c90c0617040e88f7e07df6794fc515 100644 (file)
@@ -26,7 +26,8 @@
 #include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
-#include <math.h>
+
+#include "fallback-c89.c"
 
 /**
  * SECTION:gtkrevealer